package com.diaohw.module.metadata.obj.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.diaohw.platform.framework.db.obj.BaseModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 元数据参数值
 * </p>
 *
 * @author D-Hw
 * @since 2025-04-08
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("META_VAL")
@Schema(name = "MetaValDO", description = "元数据参数值")
public class MetaValDO extends BaseModel<MetaValDO> {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 表ID
     */
    @Schema(description = "目标ID")
    @TableField("TARGET_ID")
    private String targetId;

    /**
     * 表CODE
     */
    @Schema(description = "目标CODE")
    @TableField("TARGET_CODE")
    private String targetCode;

    /**
     * 版本号
     */
    @Schema(description = "版本号")
    @TableField("VERSION_")
    private String version;

    /**
     * 是否为元数据分组
     */
    @Schema(description = "是否为元数据分组")
    @TableField("GROUP_")
    private Boolean group;

    /**
     * 关联的行ID
     */
    @Schema(description = "关联的行ID")
    @TableField("ROW_ID")
    private List<String> rowId;

    /**
     * 参数值
     */
    @Schema(description = "参数值")
    @TableField(value = "VAL_", typeHandler = JacksonTypeHandler.class)
    private Map<String, Object> val;

}
